package com.bluefox.modules.common.log;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @program: bluefox-parent
 * @description:
 * @author: Sun Feng
 * @create: 2020-07-04 10:54
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public abstract class LogComponent {

    /**********************************************************
     * 同一个线程中，记录日志时，username、sex、role相同
     * **********************************************************/

    private String username;

    private String sex;

    private String role;

    private String methodName;

    private String message;

    abstract void supplementLogContent(String... args);

    public LogComponent(String username, String sex, String role) {
        this.username = username;
        this.sex = sex;
        this.role = role;
    }
}
